<template>
  <page-header-wrapper :title="false">
    <a-card title="填写商标信息">
      <a-row>
        <a-col :span="10">
          <a-form-model
            ref="addForm"
            :model="addForm"
            :rules="addRules"
            :label-col="labelCol"
            :wrapper-col="wrapperCol"
          >
            <a-form-model-item label="商标注册号" prop="tm_reg_no">
              <a-input type="text" />
            </a-form-model-item>
            <a-form-model-item label="商标售价" prop="price">
              <a-input-number
                :min="0"
                :max="100"
                :formatter="value => `${value}元`"
                :parser="value => value.replace('元', '')"
              />
            </a-form-model-item>
            <a-form-model-item label="商标结构" prop="type">
              <a-radio-group>
                <a-radio :value="1">
                  中文
                </a-radio>
                <a-radio :value="2">
                  中文+英文
                </a-radio>
                <a-radio :value="3">
                  图形
                </a-radio>
                <a-radio :value="4">
                  中文+图形
                </a-radio>
                <a-radio :value="5">
                  英文
                </a-radio>
                <a-radio :value="6">
                  英文+图形
                </a-radio>
                <a-radio :value="7">
                  中文+英文+图形
                </a-radio>
                <a-radio :value="8">
                  其他
                </a-radio>
              </a-radio-group>
            </a-form-model-item>
            <a-form-model-item label="商标注册人" prop="register">
              <a-input type="text" />
            </a-form-model-item>
            <a-form-model-item label="商标类别" prop="category">
              <a-select placeholder="选择商标注册的类型">
                <a-select-option value="jack">第1类</a-select-option>
              </a-select>
            </a-form-model-item>
            <a-form-model-item label="有效期" prop="">
              <a-range-picker style="width: 100%" />
            </a-form-model-item>
            <a-form-model-item label="商标图样">
              <a-upload
                name="avatar"
                list-type="picture-card"
                class="avatar-uploader"
                :show-upload-list="false"
              >
                <img v-if="imageUrl" :src="imageUrl" alt="avatar" />
                <div v-else>
                  <a-icon :type="loading ? 'loading' : 'plus'" />
                  <div class="ant-upload-text">
                    商标图样
                  </div>
                </div>
              </a-upload>
            </a-form-model-item>
            <a-form-model-item>
              <a-button type="primary">确认提交</a-button>
            </a-form-model-item>
          </a-form-model>
        </a-col>
      </a-row>
    </a-card>
  </page-header-wrapper>
</template>

<script>
export default {
  name: 'AddResource',
  data () {
    return {
      labelCol: { span: 4 },
      wrapperCol: { span: 14 },
      addForm: {},
      addRules: {},
      imageUrl: ''
    }
  }
}
</script>

<style scoped>

</style>
